<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    {{msg|msgFilter}}
    <ul>
      <li v-for="item in testList">123</li>
    </ul>
  </div>
  <script src="./assets/vue.js"></script>
  <script>

    const myPlunge = {
      install(vue) {
        console.log(vue);
        vue.testMsg = '我的插件msg'
        console.log('插件安装');
      }
    }

    Vue.use(myPlunge)

    const app = new Vue({
      el: '#app',
      data: {
        msg: 'hello world!',
        listData: []
      },
      computed: {
        testList() {
          const testList = []
          testList.length = 100
          return testList
        }
      },
      filters: {
        msgFilter(val) {
          return val.split('').reverse().join('')
        }
      }
    })

    console.log(Vue.testMsg);


  </script>
</body>

</html>